/**
 * @author Justin Akin
 * @version Action Pals Core Library v0.1.0
 */
package com.actionpals.managers.drag
{	
	import com.actionpals.base.BaseClass;
	
	import flash.display.DisplayObject;
	import flash.geom.Point;
	import flash.geom.Rectangle;

	/**
	 * This data is stored to allow the Dragger Singleton to handle a drag session.
	 */
	public class DragInfo extends BaseClass
	{
		
	//--------------------------------------------------------------------------------
	//
	//	Protected Member variables
	//
	//--------------------------------------------------------------------------------
	
		protected var _target:DisplayObject;
		protected var _lockCenter:Boolean;
		protected var _bounds:Rectangle;
		protected var _mouseStartPoint:Point;
		protected var _targetStartPoint:Point;
		
	//--------------------------------------------------------------------------------
	//
	//	Constructor
	//
	//--------------------------------------------------------------------------------
	
		/**
		 * Constructor.
		 * 
		 * @param target		The item to be dragged.
		 * @param lockCenter	False will drag the target from where it started.
		 * 						True will drag the target but the 0,0 point will align
		 * 						the Mouse.
		 * @param bounds		An area that constrains the drag.
		 */
		public function DragInfo( target:DisplayObject, bounds:Rectangle = null, lockCenter:Boolean = false )
		{	
			super();
			
			_target = target ;
			_lockCenter = lockCenter;
			_bounds = bounds;	
		}
		
	//--------------------------------------------------------------------------------
	//
	//	Getters and Setters
	//
	//--------------------------------------------------------------------------------
		
		public function get target():DisplayObject
		{
			return _target;
		}
		
		public function set target( target:DisplayObject ):void
		{
			_target = target;
		}
		
		public function get lockCenter():Boolean
		{
			return _lockCenter;
		}
		
		public function set lockCenter( lockCenter:Boolean ):void
		{
			_lockCenter = lockCenter;
		}
		
		public function get bounds():Rectangle
		{
			return _bounds;
		}
		
		public function set bounds( bounds:Rectangle ):void
		{
			_bounds = bounds;
		}
		
		public function get mouseStartPoint():Point
		{
			return _mouseStartPoint;
		}
		
		public function set mouseStartPoint( mouseStartPoint:Point ):void
		{
			_mouseStartPoint = mouseStartPoint;
		}
		
		public function get targetStartPoint():Point
		{
			return _targetStartPoint;
		}
		
		public function set targetStartPoint( targetStartPoint:Point ):void
		{
			_targetStartPoint = targetStartPoint;
		}
		
	}
	
}